package com.sky.blog.dao.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.sky.blog.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author sky  2022/3/26
 * @version 1.0
 */

@Data
@TableName(value = "blog_sys_user")
@ApiModel(value = "博主基本信息")
@EqualsAndHashCode(callSuper = true)
public class SysUser extends BaseEntity {

    @TableId(value = "id")
    @ApiModelProperty(name = "帖子ID", example = "123123142312")
    private Long id;

    @ApiModelProperty(name = "用户名", example = "admin")
    private String username;

    @ApiModelProperty(name = "密码", example = "123456")
    private String password;

    /**
     * 账户是否过期   0.过期
     */
    private Integer accountNonExpired;

    /**
     * 账户是否锁定   0.锁定
     */
    @TableField()
    private Integer accountNonLocked;

    /**
     * 凭证是否过期  0.过期
     */
    private Integer credentialsNonExpired;

    /**
     * 是否开启     1.开启
     */
    private Integer enabled;

    @ApiModelProperty(name = "昵称", example = "大聪明")
    private String nickname;

    @ApiModelProperty(name = "简介", example = "人生不过三万天")
    private String slogan;

    @ApiModelProperty(name = "头像文件名称", example = "xxx/xx.jpg")
    private String avatar;

    /**
     * 随机盐
     */
    private String salt;
}
